

#define DEVICE_TYPE_LIGHT 1



#define LIGHT_CONTROLER_NUMBER 3
#define LIGHT_NUMBER 2

#define OPERATION_ON			0//3,6,9
#define OPERATION_OFF			1//4,7,10
#define OPERATION_ON_OFF		2//5,8,11

struct tLightData
{
	unsigned long DataType;  //data type = 1
	unsigned long Mac[6];
	unsigned long LightOn[LIGHT_NUMBER];
};

struct tLightCommand
{
	unsigned long LightNeedSet[LIGHT_NUMBER];
	unsigned long LightSetTo[LIGHT_NUMBER];
};

struct tMeterData
{
	unsigned long DataType; //data type = 5
	unsigned long Mac[6];

	unsigned long Power;		//xx.xxxx W
	unsigned long TotalEnergy;		//xxxxxx.xx kWh

	unsigned long Volt;			//xxx.x v
	unsigned long Current;		//xxx.xxx A

};

struct tMeterCommand
{
	unsigned long Triger;
};

struct tDcMeterData
{
	unsigned long DataType; //data type = 21
	unsigned long Mac[6];
	unsigned long Id;
	unsigned long volt;			//mv
	unsigned long Current;		//mA
};

struct tDcMeterCommand
{
	unsigned long Triger;
};